#ifndef _DSTACK_
#define _DSTACK_

#include <stdlib.h>

typedef struct stack_data *stack;

typedef int element_t;

typedef enum boolean{false=0,true} bool;

stack create(void);
/*this fuction creates a double stack*/
/*in case of failuer returns NULL*/

void clear(stack target_stack);
/*this fuction clears the given double stack*/

void delete(stack target_stack);
/*this fuction deletes the given double stack*/

unsigned int size(stack target_stack);
/*this fuction returns the given double stack's size*/

bool empty(stack target_stack);
/*this fuction checks if the given double stack is empty*/
/*if it's empty returns true, else true*/

bool push_back(stack target_stack, element_t data);
/*this fuction pushes from the back the data in the double stack*/
/*in case of failure  returns false*/

bool push_front(stack target_stack, element_t data);
/*this fuction pushes to the front the data in the double stack*/
/*in case of failure returns false*/

bool pop_front(stack target_stack);
/*this fuction pops the front element from the double stack*/
/*in case of failure returns false*/

bool pop_back(stack target_stack);
/*this fuction pops the last element of the double stack*/
/*in ase of failure returns false*/

bool front(stack target_stack, element_t *data);
/*this fuction puts in data the double stacks front element*/
/*in case of failure returns false*/

bool back(stack target_stack, element_t *data);
/*this fuction puts the last element of the double stack in data*/
/*in case of failure returns false*/


#endif
